Integrand size = 21, antiderivative size = 79 \[ \int \csc ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {3 (a+4 b) \text {arctanh}(\cos (e+f x))}{8 f}-\frac {(5 a+4 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac {a \cot ^3(e+f x) \csc (e+f x)}{4 f}+\frac {b \sec (e+f x)}{f} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3745, 466, 1171, 396, 213} \[ \int \csc ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {3 (a+4 b) \text {arctanh}(\cos (e+f x))}{8 f}-\frac {(5 a+4 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac {a \cot ^3(e+f x) \csc (e+f x)}{4 f}+\frac {b \sec (e+f x)}{f} \]
[In]
[Out]
Rule 213
Rule 396
Rule 466
Rule 1171
Rule 3745
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^4 \left (a-b+b x^2\right )}{\left (-1+x^2\right )^3} \, dx,x,\sec (e+f x)\right )}{f} \\ & = -\frac {a \cot ^3(e+f x) \csc (e+f x)}{4 f}-\frac {\text {Subst}\left (\int \frac {-a-4 a x^2-4 b x^4}{\left (-1+x^2\right )^2} \, dx,x,\sec (e+f x)\right )}{4 f} \\ & = -\frac {(5 a+4 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac {a \cot ^3(e+f x) \csc (e+f x)}{4 f}-\frac {\text {Subst}\left (\int \frac {-3 a-4 b-8 b x^2}{-1+x^2} \, dx,x,\sec (e+f x)\right )}{8 f} \\ & = -\frac {(5 a+4 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac {a \cot ^3(e+f x) \csc (e+f x)}{4 f}+\frac {b \sec (e+f x)}{f}+\frac {(3 (a+4 b)) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (e+f x)\right )}{8 f} \\ & = -\frac {3 (a+4 b) \text {arctanh}(\cos (e+f x))}{8 f}-\frac {(5 a+4 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac {a \cot ^3(e+f x) \csc (e+f x)}{4 f}+\frac {b \sec (e+f x)}{f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(276\) vs. \(2(79)=158\).
Time = 6.37 (sec) , antiderivative size = 276, normalized size of antiderivative = 3.49 \[ \int \csc ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {3 a \csc ^2\left (\frac {1}{2} (e+f x)\right )}{32 f}-\frac {b \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}-\frac {a \csc ^4\left (\frac {1}{2} (e+f x)\right )}{64 f}-\frac {3 a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{8 f}-\frac {3 b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {3 a \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{8 f}+\frac {3 b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {3 a \sec ^2\left (\frac {1}{2} (e+f x)\right )}{32 f}+\frac {b \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {a \sec ^4\left (\frac {1}{2} (e+f x)\right )}{64 f}+\frac {b \sin \left (\frac {1}{2} (e+f x)\right )}{f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )}-\frac {b \sin \left (\frac {1}{2} (e+f x)\right )}{f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )} \]
[In]
[Out]
Time = 1.05 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.29
method | result | size |
derivativedivides | \(\frac {a \left (\left (-\frac {\csc \left (f x +e \right )^{3}}{4}-\frac {3 \csc \left (f x +e \right )}{8}\right ) \cot \left (f x +e \right )+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{8}\right )+b \left (-\frac {1}{2 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {3}{2 \cos \left (f x +e \right )}+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )}{f}\) | \(102\) |
default | \(\frac {a \left (\left (-\frac {\csc \left (f x +e \right )^{3}}{4}-\frac {3 \csc \left (f x +e \right )}{8}\right ) \cot \left (f x +e \right )+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{8}\right )+b \left (-\frac {1}{2 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {3}{2 \cos \left (f x +e \right )}+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )}{f}\) | \(102\) |
risch | \(\frac {{\mathrm e}^{i \left (f x +e \right )} \left (3 a \,{\mathrm e}^{8 i \left (f x +e \right )}+12 b \,{\mathrm e}^{8 i \left (f x +e \right )}-8 a \,{\mathrm e}^{6 i \left (f x +e \right )}-32 b \,{\mathrm e}^{6 i \left (f x +e \right )}-22 a \,{\mathrm e}^{4 i \left (f x +e \right )}+40 b \,{\mathrm e}^{4 i \left (f x +e \right )}-8 a \,{\mathrm e}^{2 i \left (f x +e \right )}-32 b \,{\mathrm e}^{2 i \left (f x +e \right )}+3 a +12 b \right )}{4 f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{4} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}+\frac {3 a \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{8 f}+\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) b}{2 f}-\frac {3 a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{8 f}-\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) b}{2 f}\) | \(237\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 178 vs. \(2 (73) = 146\).
Time = 0.28 (sec) , antiderivative size = 178, normalized size of antiderivative = 2.25 \[ \int \csc ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {6 \, {\left (a + 4 \, b\right )} \cos \left (f x + e\right )^{4} - 10 \, {\left (a + 4 \, b\right )} \cos \left (f x + e\right )^{2} - 3 \, {\left ({\left (a + 4 \, b\right )} \cos \left (f x + e\right )^{5} - 2 \, {\left (a + 4 \, b\right )} \cos \left (f x + e\right )^{3} + {\left (a + 4 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + 3 \, {\left ({\left (a + 4 \, b\right )} \cos \left (f x + e\right )^{5} - 2 \, {\left (a + 4 \, b\right )} \cos \left (f x + e\right )^{3} + {\left (a + 4 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + 16 \, b}{16 \, {\left (f \cos \left (f x + e\right )^{5} - 2 \, f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )\right )}} \]
[In]
[Out]
\[ \int \csc ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\int \left (a + b \tan ^{2}{\left (e + f x \right )}\right ) \csc ^{5}{\left (e + f x \right )}\, dx \]
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.28 \[ \int \csc ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {3 \, {\left (a + 4 \, b\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) - 3 \, {\left (a + 4 \, b\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac {2 \, {\left (3 \, {\left (a + 4 \, b\right )} \cos \left (f x + e\right )^{4} - 5 \, {\left (a + 4 \, b\right )} \cos \left (f x + e\right )^{2} + 8 \, b\right )}}{\cos \left (f x + e\right )^{5} - 2 \, \cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )}}{16 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 239 vs. \(2 (73) = 146\).
Time = 0.45 (sec) , antiderivative size = 239, normalized size of antiderivative = 3.03 \[ \int \csc ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {12 \, {\left (a + 4 \, b\right )} \log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right ) - \frac {{\left (a - \frac {8 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {8 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {18 \, a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {72 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) - 1\right )}^{2}} - \frac {8 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {8 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {128 \, b}{\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1}}{64 \, f} \]
[In]
[Out]
Time = 10.25 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.75 \[ \int \csc ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a}{8}+\frac {b}{8}\right )}{f}-\frac {\left (-2\,a-34\,b\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+\left (\frac {7\,a}{4}+2\,b\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+\frac {a}{4}}{f\,\left (16\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-16\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\right )}+\frac {\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (\frac {3\,a}{8}+\frac {3\,b}{2}\right )}{f}+\frac {a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4}{64\,f} \]
[In]
[Out]